fix: Multiple tag selections for dedup key in parameterized evetns#525
Merged
cameri merged 2 commits intocameri:mainfrom Apr 19, 2026
Merged
fix: Multiple tag selections for dedup key in parameterized evetns#525cameri merged 2 commits intocameri:mainfrom
cameri merged 2 commits intocameri:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes NIP-33 parameterized replaceable event deduplication handling so only the first d tag value is used (matching expected spec behavior), and normalizes existing stored data accordingly.
Changes:
- Normalize importer-side deduplication enrichment to store only the first
dtag value. - Add a migration to collapse existing
event_deduplicationarrays to a single value and delete now-duplicate rows. - Add a unit test to ensure batch persistence normalizes parameterized deduplication to a single key.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
test/unit/services/event-import-service.spec.ts |
Adds a unit test asserting parameterized deduplication is reduced to the first d tag value during batch persistence. |
src/services/event-import-service.ts |
Changes parameterized dedup extraction to use only the first d tag value and stores it as a single-element array. |
migrations/20260419_140000_normalize_parameterized_deduplication.js |
Normalizes existing DB rows to single-value dedup keys and removes duplicates that would conflict after normalization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
cameri
approved these changes
Apr 19, 2026
This was referenced Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrations for removing multiple dedup keys and bugged import path from importer is fixed so to take jsut the first index for keys.
Related Issue
#478
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: